use $data/Table_8_1_Final.dta, replace 
xtset apt timestamp 
xtgls lnenergy hour_temp post finpost healthpost mc_fin mc_health tt tt2 tt3 i.dayofweek i.hour i.apt, panels(h) corr(psar1) force
test finpost mc_fin
local ftest=round(`r(p)',.01)
test healthpost mc_health
local htest=round(`r(p)',.01)
outreg2 using $tables/Table_8, keep(hour_temp post finpost healthpost mc_fin mc_health) label replace ///
	ctitle("ln(15 Minute kWh)") sortvar(mean_daily_temp hour_temp post finpost mc_fin healthpost  mc_health) addtext(Household Fixed Effects, Yes, P-value Health, `htest', P-value Financial, `ftest')  // Cubic Time Trend, Yes, Day of Week Fixed Effect, Yes, Hour of Day Fixed Effects, Yes, 

use $data/Table_8_2_Final.dta, replace
xtset apt timestamp 
xtgls lnenergy hour_temp post finpost healthpost mc_fin mc_health tt tt2 tt3 i.dayofweek i.hour i.apt, panels(h) corr(psar1) force
test finpost mc_fin
local ftest=round(`r(p)',.01)
test healthpost mc_health
local htest=round(`r(p)',.01)
outreg2 using $tables/Table_8, keep(hour_temp post finpost healthpost mc_fin mc_health) label append ///
	ctitle("ln(30 Minute kWh)") addtext(Household Fixed Effects, Yes, P-value Health, `htest', P-value Financial, `ftest') // Cubic Time Trend, Yes, Day of Week Fixed Effect, Yes, Hour of Day Fixed Effects, Yes, 

use $data/Table_8_3_Final.dta, replace
xtset apt timestamp 
xtgls lnenergy hour_temp post finpost healthpost mc_fin mc_health tt tt2 tt3 i.dayofweek i.hour i.apt, panels(h) corr(psar1) force
test finpost mc_fin
local ftest=round(`r(p)',.01)
test healthpost mc_health
local htest=round(`r(p)',.01)
outreg2 using $tables/Table_8, keep(hour_temp post finpost healthpost mc_fin mc_health) label append ///
	ctitle("ln(Hourly kWh)") addtext(Household Fixed Effects, Yes, P-value Health, `htest', P-value Financial, `ftest') // Cubic Time Trend, Yes, Day of Week Fixed Effect, Yes, Hour of Day Fixed Effects, Yes, 

use $data/Table_8_4_Final.dta, replace
xtset apt timestamp 
xtgls lnenergy mean_daily_temp post finpost healthpost mc_fin mc_health tt tt2 tt3 i.dayofweek i.apt, panels(h) corr(psar1) force
test finpost mc_fin
local ftest=round(`r(p)',.01)
test healthpost mc_health
local htest=round(`r(p)',.01)
outreg2 using $tables/Table_8, keep(mean_daily_temp post finpost healthpost mc_fin mc_health) label  ///
	ctitle("ln(Daily kWh)") addtext(Household Fixed Effects, Yes, P-value Health, `htest', P-value Financial, `ftest') ///
	sortvar(mean_daily_temp hour_temp post finpost mc_fin healthpost mc_health) append excel // Cubic Time Trend, Yes, Day of Week Fixed Effect, Yes, Hour of Day Fixed Effects, No, 
